//
//  WBTestViewController.swift
//  weibo
//
//  Created by 李江波 on 16/10/7.
//  Copyright © 2016年 lijiangbo. All rights reserved.
//

import UIKit

class WBTestViewController: WBBaseController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "第\(navigationController?.childViewControllers.count ?? 0)页"
        
    }

    @objc fileprivate func pushNextVc() {
    
        let vc = WBTestViewController()
        
        navigationController?.pushViewController(vc, animated: true)
    }
    
}

extension WBTestViewController{
  
    override func setupTableView() {
        super.setupTableView()
        
        let btn = UIButton(title: "下一页", normalColor: UIColor.gray, highlightedColor: UIColor.orange)
        
        btn.addTarget(self, action: #selector(pushNextVc), for: .touchUpInside)
        
        navItem.rightBarButtonItem = UIBarButtonItem(customView: btn)
        
    }
    


}
